package com.web.handler.controller;

import java.math.BigDecimal;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.web.config.RabbitConfig;
import com.web.position.entity.Position;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(value = "API - Request",description = "request")
@RestController
@RequestMapping("/request")
public class RequestController {

	@Autowired
	private RabbitConfig rabbitConfig;

	@RequestMapping(value = "/requestController",method = RequestMethod.POST)
    @ApiOperation(value = "testMQ")
	public void testMQ() {
		Position p = new Position();
		p.setAmount(new BigDecimal(1111));
		p.setCurrency("HKD");
		rabbitConfig.sendCore(p);
		//rabbitConfig.sendAccumulated(p);

	}
}
